package com.migration.model.newdb;

import jakarta.persistence.*;
import lombok.Data;
import java.io.Serializable;

/**
 * 菜单表 实体类
 * 表名：haifan_menu
 * 自动生成的实体类
 */
@Data
@Entity
@Table(name = "haifan_menu")
public class HaifanMenu implements Serializable {

    private static final long serialVersionUID = 1L;
    
    /**
     * 主键
     * 主键
     */
    @Id
    @Column(name = "id", nullable = false)
    private Long id;
    
    /**
     * 资源类型ID
     */
    @Column(name = "resource_id")
    private Long resourceId;
    
    /**
     * 父菜单ID（自关联）
     * 默认值: 0
     */
    @Column(name = "parent_id", nullable = false)
    private Long parentId;
    
    /**
     * 排序号
     */
    @Column(name = "sort_num", nullable = false)
    private Integer sortNum;
    
    /**
     * 类型（一级菜单、子菜单、按钮）
     */
    @Column(name = "menu_type", nullable = false, length = 9)
    private String menuType;
    
    /**
     * 菜单名称
     */
    @Column(name = "menu_name", nullable = false, length = 255)
    private String menuName;
    
    /**
     * 标题
     */
    @Column(name = "menu_title", nullable = false, length = 100)
    private String menuTitle;
    
    /**
     * 地址栏路由
     */
    @Column(name = "menu_path", length = 100)
    private String menuPath;
    
    /**
     * 前端组件
     */
    @Column(name = "component", length = 100)
    private String component;
    
    /**
     * 菜单图标
     */
    @Column(name = "menu_icon", length = 100)
    private String menuIcon;
    
    /**
     * 是否缓存
     */
    @Column(name = "cache_flag")
    private Boolean cacheFlag;
    
    /**
     * 是否重定向0：否，1：是
     * 默认值: 0
     */
    @Column(name = "redirect_flag")
    private Boolean redirectFlag;
    
    /**
     * 
     */
    @Column(name = "handle_type", length = 100)
    private String handleType;
    
    /**
     * 是否隐藏0：不，1：隐藏
     * 默认值: 0
     */
    @Column(name = "hidden_flag")
    private Boolean hiddenFlag;
    
    /**
     * 配置项
     */
    @Column(name = "meta", length = 500)
    private String meta;
    
    /**
     * 创建时间
     */
    @Column(name = "create_time", length = 20)
    private String createTime;
    
    /**
     * 更新时间
     */
    @Column(name = "update_time", length = 20)
    private String updateTime;
    
    /**
     * 创建人
     */
    @Column(name = "create_by")
    private Long createBy;
    
    /**
     * 更新人
     */
    @Column(name = "update_by")
    private Long updateBy;
    
    /**
     * 逻辑删除标志（0：正常，1：删除）
     * 默认值: 0
     */
    @Column(name = "is_del")
    private Boolean isDel;
    
    @Override
    public String toString() {
        return "HaifanMenu{" +
            "id=" + id +
            ", resourceId=" + resourceId +
            ", parentId=" + parentId +
            ", sortNum=" + sortNum +
            ", menuType=" + menuType +
            ", menuName=" + menuName +
            ", menuTitle=" + menuTitle +
            ", menuPath=" + menuPath +
            ", component=" + component +
            ", menuIcon=" + menuIcon +
            ", cacheFlag=" + cacheFlag +
            ", redirectFlag=" + redirectFlag +
            ", handleType=" + handleType +
            ", hiddenFlag=" + hiddenFlag +
            ", meta=" + meta +
            ", createTime=" + createTime +
            ", updateTime=" + updateTime +
            ", createBy=" + createBy +
            ", updateBy=" + updateBy +
            ", isDel=" + isDel +
        '}';
    }
} 